1. Field of the Invention
This invention relates to a storage system used as an external storage device in a computer system, a storage control device, and a storage control method, and in particular relates to a storage system, storage control device, and storage control method to control reading/writing of data to a plurality of disk drives.
2. Description of the Related Art
As various data has come to be processed electronically and handled by computers in recent years, storage systems capable of reliably storing huge quantities of data have come into widespread use. In such storage systems, large amounts of data are read and written through access by a host computer.
Such storage systems has numerous storage devices, and control devices which control the storage devices. In particular, compact, inexpensive hard disk drives or other disk drives capable of mass storage are utilized as the storage devices. Control devices access storage devices in which are stored data requested by a host or for internal processing, to execute data reading and writing.
In such a storage system, during read access data written to storage media of a storage device is read. That is, upon receiving a read access command, a control device determines the storage device in which the relevant data is stored, and issues a read command specifying an operation to read the relevant data.
The storage device analyzes the read command, determines the physical storage position of the data, reads the data at that position, and transfers the data to the control device. For example, in the case of a disk drive a head is positioned at the storage position of the relevant data on the storage media, and the head is used to read the data at that position.
An error check code (ECC) is appended to the data in such a storage device, the error check codes of read-out data are checked, and the validity of the read operation is judged. If the error check result is satisfactory and the read operation is accurate, the read-out data is transferred to the control device. And when error correction is possible, error correction is performed, and the error-corrected data is transferred.
On the other hand, when errors are detected in read-out data and correction is not possible, the data at the physical position on the storage media is once again read out (in a “retry” operation), and error checking and error correction are similarly performed. When the read operation is satisfactory, the data is similarly transferred. That is, the specified data on the media is not necessarily read out satisfactorily at only once read-out operation. In order to transfer this fact to the control device, in for example a SCSI (Small Computer System Interface) system, when in a single read operation the read operation is accurate, “good” is reported to the control device as the status, and when the read operation is recovered by the retry operation, “recovered error” is reported as the status (see for example “SCSI-2 Shousai Kaisetsu, CQ Publishing, issued Aug. 1 1995, pp. 170-172).
In the technology of the prior art, a control device treats both a “good” response and a “recovered error” response to a read request sent to a storage device (disk drive) as a normal result. The “recovered error” status is returned in cases other than when an error is not detected in a single read operation, that is, in case when data can be read during retries within a disk drive, or similar.
However, upon a recovered error response, there is the possibility that data different from previous written data may be read and transferred; and so there is the problem that the reliability of read data upon a recovered error response is low compared with read data for a good response.
For example, a write operation resulting from a write command normally overwrites the previous data with the current write data, without erasing the area of the physical position on the storage media. As a result, erase and verify are not performed, and so write speeds are improved.
In particular, in a disk drive a head is positioned at the specified physical position to perform read/write operations, so that there exists some degree of shift in read and write positions upon each read and write operation. Consequently, when writing data the previously written data is not always completely overwritten by the data of the current write operation, even when the head position in the previous write operation and in the current write operation is within the allowable range. Further, depending on the write position, adjacent tracks may exert an effect, and it is possible that during reading the written data cannot be accurately read.
In such cases, when during the next read operation reading cannot be performed in a single operation, ordinarily the head is shifted by an offset and retry reading is performed. Or, when error checking for one read operation results in error detection, and error correction is possible, the error is corrected, and the error-corrected data is transferred.
When error correction is not possible, a retry operation is performed, the head is once again positioned, data is read from the storage media, error checking is performed, and when no error is detected, or when an error is detected but error correction is possible, the resulting read-out data is transferred.
Even when such a read error is detected, recovery is possible through a retry or error correction, and data is transferred; but as explained above, due to the effect of data in adjacent tracks and incomplete overwriting, such read-out data may be different from the data which was written. Such phenomena are very rare and transient, but their effect is substantial in control devices which process read-out data.